var file = require("../models/file");

exports.showIndex = function (req, res) {
    file.getAllAlbums(function (err, albums) {
        if(err){
            res.send(err);
            return;
        }

        res.render("index", {
            "albums": albums
        });
    });
};

exports.showAlbum = function (req, res) {
    var albumName = req.params.albumName;
    res.render("album",{
        "albumname": albumName
    });
};